package com.swp.oa.sys.service;

import java.util.List;
import java.util.Map;

import com.swp.oa.sys.dto.domian.PermissionGroupItemsDto;
import com.swp.oa.sys.dto.domian.PermissionGroupDto;
import com.swp.oa.sys.dto.domian.PermissionItemDto;
import com.swp.oa.sys.dto.domian.PermissionValueDto;
import com.swp.oa.sys.dto.domian.RoleDto;
import com.swp.oa.sys.dto.page.EasyuiTreeNode;
import com.swp.oa.sys.pojo.Auth;
import com.swp.oa.sys.util.Pager;

public interface IAuthService {
	
	public abstract boolean savePermissionGroup(PermissionGroupDto permissionGroup);

	public abstract boolean savePermissionItem(PermissionItemDto permissionItem);

	public abstract boolean deleteByPrimaryKey(String authId);

	public abstract boolean delete(String[] permissionGroupIdArray);

	public abstract boolean update(PermissionGroupDto permissionGroup);

	public abstract boolean updatePermissionItem(PermissionItemDto permissionItem);
	
	public abstract List<PermissionGroupDto> getAllPermissionGroupList();
	
	public abstract Pager getAllPermissionGroupList(int pageIndex, int pageSize);

	public abstract List<PermissionItemDto> getPermissionItemsByPermissionGroupId(String permissionGroupId);

	public abstract Auth getAuthByPrimaryKey(String authId);

	public abstract String existPermissionItem(PermissionItemDto permissionItem);
	
	public abstract String existEditPermissionItem(PermissionItemDto permissionItem);

	public abstract List<PermissionGroupItemsDto> getPermissionGroupItems();

	public abstract Map<String, PermissionValueDto> ToPermissionDictionary(RoleDto role); 
	
	/**
	 * 根据Id获取部门树节点集合
	 * @param 角色ID
	 * @return
	 */
	public abstract List<EasyuiTreeNode> getTree(String roleId);

	
	
}
